// 采购单的退货结算的接口
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp/bill`

// 
export function initAddBill(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/initAddBill`,
		method: 'post',
		data: params
	})
}


// 新增付款单
export function addData(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/addData`,
		method: 'post',
		data: params
	})
}

// 根据id获取采购单信息
export function updateViewBillAndDetailsByBillId(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/viewBillAndDetailsByBillId`,
		method: 'post',
		data: params
	})
}

// 审核
export function audit(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/audit`,
		method: 'post',
		data: params
	})
}

// 作废
export function purchaseCancel(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/cancel`,
		method: 'post',
		data: params
	})
}
// 删除付款单
export function deleteById(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/deleteById`,
		method: 'post',
		data: params
	})
}
// 编辑

export function updateData(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/updateData`,
		method: 'post',
		data: params
	})
}
// 获取进货退货
export function getlist(params) {
	return axiosp.request({
		url: `${baseUrl}/purchase/listPage`,
		method: 'post',
		data: params
	})
}

// 获取进货单
export function getSaleReturnlist(params) {
	return axiosp.request({
		url: `${baseUrl}/purchaseReturn/listPage`,
		method: 'post',
		data: params
	})
}
